home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / bin / junit < prev    next >
Encoding:
Text File  |  2009-11-28  |  1.4 KB  |  57 lines

  1. #!/bin/sh
  2. #
  3. # junit command line program for Debian
  4. # author:  Takashi Okamoto <tora@debian.org>
  5. # usage:
  6. #        junit [-text] <TestCase> output result with text. 
  7. #                                 This mode is default.
  8. #        junit -awt <TestCase>    output result with awt ui.
  9. #        junit -swing <TestCase>  output result with swing ui.
  10.  
  11.  
  12. TESTRUNNER=junit.textui.TestRunner
  13. CLASSPATH=${CLASSPATH}:/usr/share/java/junit.jar:.
  14.  
  15. if [ "$#" = "0" ]; then
  16.   TESTRUNNER=junit.awtui.TestRunner
  17. fi
  18.  
  19. if [ "$1" = "-text" ] ; then
  20.   shift;
  21.   if [ "$#" = "0" ] ; then
  22.     FLAG=false
  23.   fi
  24. elif [ "$1" = "-swing" ] ; then
  25.   shift;
  26.   TESTRUNNER=junit.swingui.TestRunner
  27.   if [ "$#" != "0" ]; then
  28.     echo "-swing option should not have other arguments"
  29.     exit;
  30.   fi
  31.  
  32. elif [ "$1" = "-awt" ] ; then
  33.   shift
  34.   TESTRUNNER=junit.awtui.TestRunner
  35.   if [ "$#" != "0" ]; then    
  36.     echo "-awt option should not have other arguments"
  37.     exit;
  38.   fi
  39.  
  40. fi
  41.  
  42.  
  43. if [ "$1" = "-help" ] || [ "$FLAG" = "false" ] ; then
  44.   echo "junit 3.8.1 -- this version is modified by Takashi Okamoto <tora@debian.org> for Debian."
  45.   echo "Usage:    junit "
  46.   echo "        -text  <TestCaseName> -  using text user interface."
  47.   echo "        -awt    - using awt user interface."
  48.   echo "        -swing    - using swing user interface."
  49.   echo "TestCaseName is the name of the TestCase class"
  50.   exit
  51. fi
  52.  
  53. exec java -classpath ${CLASSPATH} ${TESTRUNNER}  ${1+"$@"}
  54.  
  55.  
  56.  
  57.